<!--Author: @ngel Sullon Macalupu-->
<?
require_once '../../Include.php';
require_once '../../WEB_INF/SubmitConsulting/LiveScrum/ModScrum/Data/IteracionData.php';
require_once '../../WEB_INF/SubmitConsulting/LiveScrum/ModScrum/Data/Entity/Iteracion.php';
require_once '../../WEB_INF/SubmitConsulting/LiveScrum/ModScrum/Data/Entity/Proyecto.php';
require_once '../../WEB_INF/SubmitConsulting/LiveScrum/ModConfig/Data/Entity/Usuario.php';
require_once '../../WEB_INF/SubmitConsulting/LiveScrum/ModScrum/Data/Enum/ItemTipo.php';
?>
<?
$link = trim($_REQUEST['link']) ? trim($_REQUEST['link']) : $link;
?>

<table class="CategoryTable">
    <tr>
        <td>

            <DIV class=CategoryHeader>Seguir Proyecto</DIV>

            <div class="CategoryItem<? if ($link == "r0")
                echo "Selected"; ?>">  <a href="PlanificacionMain.php">
                    &nbsp;All Sprint </a></div>
                 <?
                 $tran = new IteracionData();
                 $res = $tran->listByFilter($_SESSION['proyectoId']);
                 foreach ($res as $row) {
                 ?><div class="CategoryItem<? if ($link == 'r'.$row->getIteracionId())
                         echo "Selected"; ?>">
                     <a href="PlanificacionMain.php?iteracionId=<?= $row->getIteracionId() ?>&link=r<?= $row->getIteracionId() ?>" >
                             &nbsp;<?= $row->getRutaSprint() ?><?= $row->getSprintActivo() ?></a>
             </div>
            <? } ?>


            
            <DIV class=CategoryHeader>Actualizar Artefactos</DIV>


                 <div class="CategoryItem<? if ($link == "l2")
                     echo "Selected"; ?>">
                <a href="IteracionMain.php">
                    &nbsp;Iteration Backlog </a></div>
                 <div class="CategoryItem<? if ($link == "l3")
                     echo "Selected"; ?>">
                     <a href="ProductoMain.php">
                         &nbsp;Product Backlog </a></div>

            <?
                 foreach (ItemTipo::$enum as $key => $value) {
            ?><div class="CategoryItem<? if ($link == $key)
                         echo "Selected"; ?>">
                         <a href="ItemMain.php?itemTipo=<?= $key ?>&link=<?= $key ?>" >
                        &nbsp;<?= $value ?>  </a>
                </div>

<?
                 }
?>



            <DIV class=CategoryHeader>Sprint Backlog</DIV>
            <div class="CategoryItem<? if ($link == "l4")
                     echo "Selected"; ?>">
                <a href="ItemMain.php?itemTipo=">
                    &nbsp;Sprint Backlog </a></div>
                 <?
                 $tran = new IteracionData();
                 $res = $tran->listByFilter($_SESSION['proyectoId']);
                 foreach ($res as $row) {
                 ?><div class="CategoryItem<? if ($link == $row->getIteracionId())
                         echo "Selected"; ?>">
                         <a href="ItemMain.php?iteracionId=<?= $row->getIteracionId() ?>&link=<?= $row->getIteracionId() ?>" >
                             &nbsp;<?= $row->getRutaSprint() ?><?= $row->getSprintActivo() ?> </a>
             </div>
            <? } ?>
        </td></tr>
</table>